import React from 'react';
import { Outlet } from 'react-router-dom';
import { useSelector } from 'react-redux';

import Swiper from '../../components/Swiper';
import Navbar from '../../components/Navbar';

function Films(props) {
  const showBar = useSelector((state) => state.TabbarReducer.showBar);
  return (
    <>
      {showBar && (
        <>
          <Swiper></Swiper>
          <Navbar></Navbar>
        </>
      )}

      <Outlet />
    </>
  );
}

export default Films;
